<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"    
      xmlns:p="http://primefaces.org/ui">
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>
        <h:form>
            <p:panel>
                <p:panelGrid columns="3" >
                    <f:facet name="header">
                        <b>Create Feedback</b>
                    </f:facet>
                    <h:outputLabel value="ClientName" for="fbClientName" />
                    <p:inputText id="fbClientName" value="#{feedbackController.selected.fbClientName}" title="Name" />
                    <h:panelGroup/>

                    <h:outputLabel value="Description :" for="fbDescription" /> 
                    <h:inputTextarea id="fbDescription" value="#{feedbackController.selected.fbDescription}" title="Description" />
                    <h:panelGroup/>

                    <h:outputLabel value="SatisfyingLevel :" for="fbSatisfyingLevel" />
                    <p:selectOneRadio id="fbSatisfyingLevel" value="#{feedbackController.selected.fbSatisfyingLevel}" >  
                        <f:selectItem itemLabel="Good" itemValue="1" />  
                        <f:selectItem itemLabel="Medium" itemValue="2" /> 
                        <f:selectItem itemLabel="Poorly" itemValue="3" />  
                    </p:selectOneRadio>
                    <h:panelGroup/>

                    <h:outputLabel value=" Problem :" for="fbProblem" /> 
                    <h:inputTextarea id="fbProblem" value="#{feedbackController.selected.fbProblem}" title="Problem" />
                    <h:panelGroup/>

                    <h:panelGroup/>
                    <h:inputHidden id="fbImprovement" value="#{feedbackController.selected.fbImprovement}" />
                    <h:panelGroup/>
                    

                    <f:facet name="footer">
                        <br />
                    </f:facet>
                </p:panelGrid>
                <p:commandButton action="#{feedbackController.create}" value="Save" icon="ui-icon-check"/>
                <p:commandButton action="#{feedbackController.prepareList}" value="Show All" immediate="true" icon="ui-icon-script"/>
            </p:panel>
        </h:form>
    </h:body>
</html>

